Repository navigation
feat(flow-design): 默认取人脚本返回 OperatorKey,变量列表补身份标识 - #89
Merged
Merged
Conversation
- SCRIPT_DEFAULT_OPERATOR_LOAD 改为 return [request.getCreatedOperatorKey()], 设计器「指定人员 - 流程创建者」新建的脚本直接带上发起身份 - 变量列表补 request.getCreatedOperatorKey / getCurrentOperatorKey / getSubmitOperatorKey / findPreviousNodeOperators 对应后端 codingapi/flow-engine#303
This was referenced Dec 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
对应后端 codingapi/flow-engine#303(PR:codingapi/flow-engine#304 / #305)。
改动
packages/flow-design/src/script-components/default-script.ts:SCRIPT_DEFAULT_OPERATOR_LOAD改为return [request.getCreatedOperatorKey()],设计器「指定人员 → 流程创建者」新建的脚本直接带上发起身份;packages/flow-design/src/script-components/utils/varibale.ts:变量列表补request.getCreatedOperatorKey()、getCurrentOperatorKey()、getSubmitOperatorKey()、findPreviousNodeOperators()(操作人分组末尾,order 70-73)。未改动(说明)
operator-load-view.tsx:默认模板已带身份,不再新增「流程创建者(带身份)」选项,避免两个语义近似的入口;存量脚本不做静默改写;current-workflow-presenter.ts(子流程发起人):该选项产出的是人员 id 表达式,由后端解析为子流程发起人,改成OperatorKey会破坏解析,不在本 issue 范围。验证
npx rstest run --root packages/flow-design:15 个测试文件 / 49 例通过;pnpm -F @coding-flow/flow-design build:rslib 构建通过(287 文件)。